/**
 * Created by meiguizhinian on 2018/6/28
 * Copyright © 2018 lixiaolong. All rights reserved.
 */

//对象 let obj = new ll.Obj(param)
(function () {
	ivy.AnimationID = function (classID, actionID, sequenceID=0, selfUpdate=true, playState=ivy.AniPlayState.eCircle, playType=ivy.AniPlayType.eNormal) {
		//成员变量
		if (!classID) {
			classID = 0;
		}
		if (!actionID) {
			actionID = 0;
		}
		this.classID = classID;
		this.actionID = actionID;
		this.sequenceID = sequenceID;
		this.selfUpdate = selfUpdate;
		this.playState = playState;
		this.playType = playType;
	};
	let p = ivy.AnimationID.prototype;
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	p.equal = function(id) {
		return this.classID === id.classID
			&&this.actionID === id.actionID
			&&this.sequenceID === id.sequenceID
			&&this.selfUpdate === id.selfUpdate
			&&this.playState === id.playState
			&&this.playType === id.playType;
	};

	p.set = function(id) {
		this.classID = id.classID;
		this.actionID = id.actionID;
		this.sequenceID = id.sequenceID;
		this.selfUpdate = id.selfUpdate;
		this.playState = id.playState;
		this.playType = id.playType;
	};

	p.reset = function() {
		this.classID = -1;
		this.actionID = -1;
		this.playState = ivy.AniPlayState.eCircle;
		this.playType = ivy.AniPlayType.eNormal;
		this.selfUpdate = true;
	};
	p.vaild = function() {
		return this.classID >= 0 && this.actionID >= 0;
	};
	p.invaild = function() {
		return !this.vaild();
	};
})();
